package com.ewzj.bigdata.mvp.model.rspbean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * author:zhangjing
 * 作用:
 * return:
 */

public class ReginBean implements Parcelable {

    /**
     * id : 5
     * go_url : http://h5.15miwo.cn/lp/5
     * groupId : 1
     * three_url : http://cd.fang.anjuke.com/loupan/415454.html
     * sum : 353
     * thumb : http://pic1.ajkimg.com/display/xinfang/e771fbbc6d5a2bfa7044b84a69871ab8/800x600m.jpg
     * name : 新希望锦悦楠庭
     * region : 武侯区
     * address : 四川省成都市武侯区天府三街19号
     * house_type : xinfang
     * house_tags : [{"tag_name":"普通住宅","color":"#85c6dc"}]
     * price : 12600元/平
     * area : 面积未知
     * sources : 安居客
     * visit : 52
     * lon : 104.073315
     * lat : 30.552758
     * is_self : 1
     * is_collect : 0
     */

    private String id;
    private String go_url;
    private String groupId;
    private String three_url;
    private String sum;
    private String thumb;
    private String name;
    private String region;
    private String address;
    private String house_type;
    private String price;
    private String area;
    private String sources;
    private String visit;
    private Double lon;
    private Double lat;
    private String is_self;
    private String is_collect;
    private List<HouseTagsEntity> house_tags;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getGo_url() {
        return go_url;
    }

    public void setGo_url(String go_url) {
        this.go_url = go_url;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getThree_url() {
        return three_url;
    }

    public void setThree_url(String three_url) {
        this.three_url = three_url;
    }

    public String getSum() {
        return sum;
    }

    public void setSum(String sum) {
        this.sum = sum;
    }

    public String getThumb() {
        return thumb;
    }

    public void setThumb(String thumb) {
        this.thumb = thumb;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getHouse_type() {
        return house_type;
    }

    public void setHouse_type(String house_type) {
        this.house_type = house_type;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getSources() {
        return sources;
    }

    public void setSources(String sources) {
        this.sources = sources;
    }

    public String getVisit() {
        return visit;
    }

    public void setVisit(String visit) {
        this.visit = visit;
    }

    public Double getLon() {
        return lon;
    }

    public void setLon(Double lon) {
        this.lon = lon;
    }

    public Double getLat() {
        return lat;
    }

    public void setLat(Double lat) {
        this.lat = lat;
    }

    public String getIs_self() {
        return is_self;
    }

    public void setIs_self(String is_self) {
        this.is_self = is_self;
    }

    public String getIs_collect() {
        return is_collect;
    }

    public void setIs_collect(String is_collect) {
        this.is_collect = is_collect;
    }

    public List<HouseTagsEntity> getHouse_tags() {
        return house_tags;
    }

    public void setHouse_tags(List<HouseTagsEntity> house_tags) {
        this.house_tags = house_tags;
    }

    public static class HouseTagsEntity {
        /**
         * tag_name : 普通住宅
         * color : #85c6dc
         */

        private String tag_name;
        private String color;

        public String getTag_name() {
            return tag_name;
        }

        public void setTag_name(String tag_name) {
            this.tag_name = tag_name;
        }

        public String getColor() {
            return color;
        }

        public void setColor(String color) {
            this.color = color;
        }
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.go_url);
        dest.writeString(this.groupId);
        dest.writeString(this.three_url);
        dest.writeString(this.sum);
        dest.writeString(this.thumb);
        dest.writeString(this.name);
        dest.writeString(this.region);
        dest.writeString(this.address);
        dest.writeString(this.house_type);
        dest.writeString(this.price);
        dest.writeString(this.area);
        dest.writeString(this.sources);
        dest.writeString(this.visit);
        dest.writeValue(this.lon);
        dest.writeValue(this.lat);
        dest.writeString(this.is_self);
        dest.writeString(this.is_collect);
        dest.writeList(this.house_tags);
    }

    public ReginBean() {
    }

    protected ReginBean(Parcel in) {
        this.id = in.readString();
        this.go_url = in.readString();
        this.groupId = in.readString();
        this.three_url = in.readString();
        this.sum = in.readString();
        this.thumb = in.readString();
        this.name = in.readString();
        this.region = in.readString();
        this.address = in.readString();
        this.house_type = in.readString();
        this.price = in.readString();
        this.area = in.readString();
        this.sources = in.readString();
        this.visit = in.readString();
        this.lon = (Double) in.readValue(Double.class.getClassLoader());
        this.lat = (Double) in.readValue(Double.class.getClassLoader());
        this.is_self = in.readString();
        this.is_collect = in.readString();
        this.house_tags = new ArrayList<HouseTagsEntity>();
        in.readList(this.house_tags, HouseTagsEntity.class.getClassLoader());
    }

    public static final Parcelable.Creator<ReginBean> CREATOR = new Parcelable.Creator<ReginBean>() {
        @Override
        public ReginBean createFromParcel(Parcel source) {
            return new ReginBean(source);
        }

        @Override
        public ReginBean[] newArray(int size) {
            return new ReginBean[size];
        }
    };
}
